import { http } from '@/common/service/service.js' 
import configService from '@/common/service/config.service.js';
const apiService = {
	 
	 /**
	  * 登录
	  */
	// login(params) {
	// 	return http.post('/sys/mLogin',params)	
		
	// },
	//API公告模块-列表查询
	noticelist(params) {
		return http.get("/notice/list",{params:params})
	},
	//API公告模块-列表查询
	referenceslist(params) {
		return http.get("/references/list",{params:params})
	},
	//API公告模块-通过id查询
	noticequeryById(params) {
		return http.get("/notice/queryById",{params:params})
	},
	//修改密码
	changePassword(params) {
		return http.put("/sys/user/changePassword ",params)
	},
	//上传照片
	uploadbiz(params) {
		return http.post("/sys/common/upload?biz=place",params)
	},
	
	communitylist() {
	  return http.get("/sys/sysDepart/queryDepartTreeSync",{params:{pid:'3d40571077c34e04b747d235722bb4a5'}})
	},
	//行业类别
	categoryList() {
	  return http.get("/sys/category/loadTreeRoot?async=false&pcode=B03")
	},
	//所属地区
	queryTreeList(params) {
	  return http.get("/sys/sysDepart/queryTreeList",{params:params})
	},
	//API场所管理-通过id查询
	queryById(id) {
	  return http.get("/place/queryById?id="+ id)
	},
	//API场所隐患表-场所的隐患列表查询
	listByPlace(params) {
	  return http.get("/place/danger/listByPlace",{params:params})
	},
	//API场所管理-场所详情
	listBydetail(id) {
	  return http.get("/place/detail?id="+ id)
	},
	//API场所管理-场所详情
	photolist(id) {
	  return http.get("/place/photo/list?placeId="+ id)
	},
	//API场所图片-添加
	photoadd(params) {
	  return http.post("/place/photo/addList",params)
	},
	//API场所图片-批量删除
	deleteBatch(id) {
	  return http.delete("/place/photo/deleteBatch?ids="+id)
	},
	//API场所图片-批量删除
	placephotodelete(id) {
	  return http.delete("/place/danger/photo/delete?ids="+id)
	},
	
	//场所图片-编辑
	editBatch(params) {
	  return http.post("/place/photo/edit",params)
	},
	//API场所管理-编辑
	placeedit(params) {
	  return http.put("/place/edit",params)
	},
	//API场所管理-编辑
	checkadd(params) {
	  return http.post("/place/check/add",params)
	},
	//API排查项目-分页列表查询
	listByCheck(params) {
	  return http.get("/check/project/listByCheck",{params:params})
	},
	//API排查整改库--排查列表查询
	rectifyCheck(params) {
	  return http.get("/check/rectify/listByCheck",{params:params})
	},
	//API排查整改库-列表查询
	rectifyList(params) {
	  return http.get("/check/rectify/listByCriteria",{params:params})
	},
	//API场所隐患表-添加
	dangeradd(params) {
	  return http.post("/place/danger/add",params)
	},
	//场所隐患-通过id删除
	dangerdelete(id) {
	  return http.delete("/place/danger/delete?id=" + id)
	},
	
	//API场所隐患-分页列表查询
	dangerpage(params) {
	  return http.post("/place/danger/page",params)
	},
	//API排查统计-总体情况查询
	queryAll(params) {
	  return http.get("/statistics/queryAll",{params:params})
	},
	//API排查统计-场所类型情况查询
	queryPlaceType(params) {
	  return http.get("/statistics/queryPlaceType",{params:params})
	},
	//API场所隐患表-通过id查询
	dangerqueryById(params) {
	  return http.get("/place/danger/queryById",{params:params})
	},
	//API场所隐患流程表-分页列表查询
	flowlist(params) {
	  return http.get("/place/danger/flow/list",{params:params})
	},
	//API场所隐患流程表-分页列表查询
	flowadd(params) {
	  return http.post("/place/danger/flow/add",params)
	},
	//API场所排查-通过id查询
	checkqueryById(params) {
	  return http.get("/place/check/queryById",{params:params})
	},
	//API场所排查明细表-添加
	checkdetailadd(params) {
	  return http.post("/place/check/detail/add",params)
	},
	//API场所排查明细表-编辑
	checkdetailedit(params) {
	  return http.put("/place/check/detail/edit",params)
	},
	//API场所隐患表-编辑
	dangeredit(params) {
	  return http.put("/place/danger/edit",params)
	},
	//API隐患图片-批量删除
	dangerphoto(id) {
	  return http.delete("/place/danger/photo/deleteBatch?ids="+id)
	},
	//API场所排查-编辑
	checkedit(params) {
	  return http.put("/place/check/edit",params)
	},
	//API场所管理-导出打印
	placeexport(params) {
	  return http.get("/place/export",{params:params,responseType: 'arraybuffer'})
	},
	//API排查统计-隐患情况查询
	queryDanger(params) {
	  return http.get("/statistics/queryDanger",{params:params})
	},
	//API排查统计-隐患情况列表
	dangerlist(params) {
	  return http.get("/statistics/danger/list",{params:params})
	},
	//API排查统计-人员工作统计
	queryUserWork(params) {
	  return http.get("/statistics/queryUserWork",{params:params})
	},
	//API排查统计-人员工作统计场所列表
	queryUserWorkByPlace(params) {
	  return http.get("/statistics/queryUserWorkByPlace",{params:params})
	},
	//API排查统计-人员工作统计场所列表
	queryUserWorkByDanger(params) {
	  return http.get("/statistics/queryUserWorkByDanger",{params:params})
	},
	
	// !---------------教育排查 ----------------------------------!
	//API学校管理-通过id查询
	schoolqueryById(id) {
	  return http.get("/school/queryById?id="+ id)
	},
	//API学校管理-学校详情
	schooldetail(id) {
	  return http.get("/school/detail?id="+ id)
	},
	//API学校隐患-列表查询
	dangerlistByCheck(params) {
	  return http.get("/school/danger/listByCheck",{params:params})
	},
	//API学校管理-编辑
	schooledit(params) {
	  return http.put("/school/edit",params)
	},
	//API学校图片-列表查询
	schoolphotolist(id) {
	  return http.get("/school/photo/list?schoolId="+ id)
	},
	//API学校相关图片-批量添加
	schoolphotoadd(params) {
	  return http.post("/school/photo/addList",params)
	},
	//API场所图片-批量删除
	schooldeleteBatch(id) {
	  return http.delete("/school/photo/deleteBatch?ids="+id)
	},
	//API学校排查-添加
	schoolcheckadd(params) {
	  return http.post("/school/check/add",params)
	},
	//API教育排查标准-分页列表查询
	criterialistByCheck(params) {
	  return http.get("/education/criteria/listByCheck",{params:params})
	},
	//API排查整改库-排查列表查询
	educationrectifyCheck(params) {
	  return http.get("/education/rectify/listByCheck",{params:params})
	},
	//API教育场所排查明细表-添加
	schoolcheckdetailadd(params) {
	  return http.post("/school/check/detail/add",params)
	},
	//学校排查明细-编辑
	schoolcheckdetailedit(params) {
	  return http.put("/school/check/detail/edit",params)
	},
	//API学校排查-编辑
	schoolcheckedit(params) {
	  return http.put("/school/check/edit",params)
	},
	//API学校排查-通过id查询
	schoolcheckqueryById(params) {
	  return http.get("/school/check/queryById",{params:params})
	},
	//API教育排查整改库-列表查询
	rectifylistByCriteria(params) {
	  return http.get("/education/rectify/listByCriteria",{params:params})
	},
	//API教育排查整改库-列表查询
	schooldangerphoto(id) {
	  return http.delete("/school/danger/photo/deleteBatch?ids="+id)
	},
	schooldangerdelete(id) {
	  return http.delete("/school/danger/delete?id="+id)
	},
	
	//API场所隐患表-添加
	schooldangeradd(params) {
	  return http.post("/school/danger/add",params)
	},
	//API场所隐患表-编辑
	schooldangeredit(params) {
	  return http.put("/school/danger/edit",params)
	},
	//API教育场所隐患表-通过id查询
	schooldangerqueryById(params) {
	  return http.get("/school/danger/queryById",{params:params})
	},
	//API场所隐患流程表-分页列表查询
	schoolflowlist(params) {
	  return http.get("/school/danger/flow/list",{params:params})
	},
	//API学校隐患流程-添加
	schoolflowadd(params) {
	  return http.post("/school/danger/flow/add",params)
	},
	//API学校场所排查-通过id查询
	schoolcheckqueryById(params) {
	  return http.get("/school/check/queryById",{params:params})
	},
	//API场所管理-导出打印
	schoolexport(params) {
	  return http.get("/school/export",{params:params,responseType: 'arraybuffer'})
	},
	//API学校场所隐患表-场所的隐患列表查询
	schoollistByCheck(params) {
	  return http.get("/school/danger/listByCheck?checkId="+ params.checkId + '&dangerDesc=' + params.dangerDesc)
	},
	//API学校场所排查-通过id查询
	agendalist(params) {
	  return http.get("/agenda/list",{params:params})
	},
	rectifyitemlist(params) {
	  return http.get("/education/rectify/item/list",{params:params})
	},
	//API教育场所图片-批量删除
	schoolphotodelete(id) {
	  return http.delete("/school/danger/photo/delete?ids="+id)
	},
	//API教育排查--项目专家团队-添加
	teamadd(params) {
	  return http.post("/school/check/team/add",params)
	},
	//API教育排查--项目专家团队-列表查询
	teamlist(params) {
	  return http.get("/school/check/team/list",{params:params})
	},
	//API教育排查--项目专家团队-编辑
	teamedit(params) {
	  return http.put("/school/check/team/edit",params)
	},
	//API教育排查--项目专家团队-通过id删除
	teamdelete(id) {
	  return http.delete("/school/check/team/delete?id="+id)
	},
	
	//API教育排查总体安排-添加
	planadd(params) {
	  return http.post("/school/check/plan/add",params)
	},
	//教育排查总体安排-编辑
	planedit(params) {
	  return http.put("/school/check/plan/edit",params)
	},
	
	
	//API教育排查--项目专家团队-列表查询
	planqueryByCheckId(checkId) {
	  return http.get("/school/check/plan/queryByCheckId?checkId="+ checkId)
	},
	
	
	
	
	
};

export default apiService;
